<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

% if type(posts) == dict:
%arttitle = posts.get('title')
<title>{{arttitle}}|{{BLOG_NAME}}</title>
%else:
<title>{{title}}</title>
%end
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="/static/default.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- start header -->
<div id="header">
  %if user:
  <div id="head">
      <div id="user">欢迎您:{{user}}&nbsp;&nbsp;<a href="/admin">进入管理界面</a> |  <a href="/logout">退出</a></div>
  </div>
  %end
  <div id="banner">
	<div id="logo">
        <h1>{{BLOG_NAME}}</h1>
        <p>{{SUBTITLE}}</p>
	</div>
  </div>
  <div id="menu">
	<ul>
	  <li class="current_page_item"><a href="/">首页</a></li>
	 % for cate in allcates:
	  <li><a href="/categories/{{cate.get('_id')}}/">{{cate.get('name')}}</a></li>
	  %end
	</ul>
  </div>
</div>
<!-- end header -->
